Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update information regarding fileImporter SwiftUI API #3085

Merged
merged 7 commits into from
Feb 10, 2025

Conversation

isevendays-saucelabs
Copy link
Collaborator

Description

Update description regarding fileImporter API.

Motivation and Context

The customer enabled instrumentation and faced issues with accessing the Downloads folder using fileImporter SwiftUI API.
We should document that this is not supported due to a limitation in the Apple security system.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation fix (typos, incorrect content, missing content, etc.)

@isevendays-saucelabs isevendays-saucelabs requested a review from a team as a code owner February 7, 2025 16:51
Copy link

github-actions bot commented Feb 7, 2025

Deploy preview ready for 3085!
https://docs.dev.saucelabs.net/pr-preview/pr-3085


For instrumentation, Sauce Labs must re-sign the app using our certificates and provisioning profiles, and change the bundle identifier to Sauce Labs wildcard identifier.

This is an inherent limitation of the Apple system.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "this" here references the idea in the first paragraph, which makes me think this sentence should follow immediately after it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

### Unable to access Downloads folder using 'fileImporter' SwiftUI API
Apple prevents access to private sandbox data via fileImporter (and likely other APIs) after re-signing an app.

For instrumentation, Sauce Labs must re-sign the app using our certificates and provisioning profiles, and change the bundle identifier to Sauce Labs wildcard identifier.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence could go first, as it's basically just a preamble to provide some context.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already say in the very beginning that we need to resign apps, I don't think we need to mention this here explicitly again

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmissmann thanks for the comment! I updated the docs

@@ -149,3 +149,11 @@ We recommend that you try the following workaround:
2. If the above solution does not work, try using a different network without the proxy.

We do not have control over Apple's signature verification process. It is recommended to work with your network administrator to ensure that Apple's signature check is not blocked by the proxy.

### Unable to access Downloads folder using 'fileImporter' SwiftUI API
Apple prevents access to private sandbox data via fileImporter (and likely other APIs) after re-signing an app.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This page apparently uses a mix of "resigning" and "re-signing", but I think we should standardize on "resigning" everywhere.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I've updated the docs

For instrumentation, Sauce Labs must re-sign the app using our certificates and provisioning profiles, and change the bundle identifier to Sauce Labs wildcard identifier.

This is an inherent limitation of the Apple system.
The solution for the client is to not use instrumentation when accessing data using `fileImporter `.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are public customer-facing docs, so I think we should refer to them in 2nd person rather than 3rd person (like we do in the rest of the page). This could just say "The only currently known workaround is X".

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks! I've updated the docs

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmissmann thanks for the comment! I updated the docs

@@ -149,3 +149,11 @@ We recommend that you try the following workaround:
2. If the above solution does not work, try using a different network without the proxy.

We do not have control over Apple's signature verification process. It is recommended to work with your network administrator to ensure that Apple's signature check is not blocked by the proxy.

### Unable to access Downloads folder using 'fileImporter' SwiftUI API
Apple prevents access to private sandbox data via fileImporter (and likely other APIs) after re-signing an app.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also add a sentence about how the issue manifests itself (e.g. the app crashes).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added examples

Copy link

github-actions bot commented Feb 7, 2025

Deploy preview ready for 3085!
https://docs.dev.saucelabs.net/pr-preview/pr-3085

Copy link

github-actions bot commented Feb 7, 2025

Deploy preview ready for 3085!
https://docs.dev.saucelabs.net/pr-preview/pr-3085

1 similar comment
Copy link

github-actions bot commented Feb 7, 2025

Deploy preview ready for 3085!
https://docs.dev.saucelabs.net/pr-preview/pr-3085

Copy link

Deploy preview ready for 3085!
https://docs.dev.saucelabs.net/pr-preview/pr-3085

@@ -149,3 +149,11 @@ We recommend that you try the following workaround:
2. If the above solution does not work, try using a different network without the proxy.

We do not have control over Apple's signature verification process. It is recommended to work with your network administrator to ensure that Apple's signature check is not blocked by the proxy.

### Unable to access Downloads folder using 'fileImporter' SwiftUI API
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put this into it's own section

## Known Errors caused by resigning

In some cases resigning apps with a Sauce Labs certificate and provisioning profile breaks certain features of your app.

The known limitations are listed below and the only known workaround for those errors is to disable resigning using private devices.

### Unable to access Downloads folder using 'fileImporter' SwiftUI API
...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmissmann thanks for the comment! I updated the docs

### Unable to access Downloads folder using 'fileImporter' SwiftUI API
Apple prevents access to private sandbox data via fileImporter (and likely other APIs) after re-signing an app.

For instrumentation, Sauce Labs must re-sign the app using our certificates and provisioning profiles, and change the bundle identifier to Sauce Labs wildcard identifier.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already say in the very beginning that we need to resign apps, I don't think we need to mention this here explicitly again

For instrumentation, Sauce Labs must re-sign the app using our certificates and provisioning profiles, and change the bundle identifier to Sauce Labs wildcard identifier.

This is an inherent limitation of the Apple system.
The solution for the client is to not use instrumentation when accessing data using `fileImporter `.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Deploy preview ready for 3085!
https://docs.dev.saucelabs.net/pr-preview/pr-3085

Copy link

Deploy preview ready for 3085!
https://docs.dev.saucelabs.net/pr-preview/pr-3085

@isevendays-saucelabs isevendays-saucelabs merged commit dec0ce1 into main Feb 10, 2025
3 checks passed
@isevendays-saucelabs isevendays-saucelabs deleted the ios-docs-update branch February 10, 2025 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants